package com.dhgate.spu.analysis.stat;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.text.ParseException;
import java.util.Map;

public class A {
	public static void main(String[] args) {
	       BufferedReader br = null;
	        String sCurrentLine;
//	        for(int i=1;i<6;i++){
		        try {  
					br = new BufferedReader(new FileReader("D:\\a.csv"));
					while((sCurrentLine = br.readLine()) != null){
			            System.out.println(sCurrentLine);
						int index = sCurrentLine.indexOf(",");
						sCurrentLine = sCurrentLine.substring(index+1);
			            String[] split = sCurrentLine.split(",");
			            System.out.println(sCurrentLine);
			            //解决由于“，”分隔符引起的错误
			            int specialIndex = 0;
			            for(int i = 0;i < split.length;i++){
			            	if(split[i].indexOf("\"") != -1){
			            		specialIndex = i;
			            	}
			            } 
			            if(specialIndex != 0){
			            	for(int i=2;i <= specialIndex;i++){
			            		split[1] += " "+split[i]+" ";
			            	}
			            	
			            	split[4] = split[specialIndex + 3];
			            }
			            System.out.println(split[1]+" " +split[4]);			                        		            	

			            		            
			        }
				} catch (FileNotFoundException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}		        	
	        }
	
//	}
}
